package com.class04.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @ClassDescription:
 * spring的初始化类
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2023/12/21 18:58
 */
public class SpringIoCInit extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override//rootioc容器的配置
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{DataSourceJavaConfig.class,
                MapperJavaConfigNEW.class,ServiceJavaConfig.class};
    }

    @Override//webioc容器的配置类指定
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebMvcJavaConfig.class};
    }

    @Override//dispatcherServlet的拦截路径
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
